FLAG-87: Complete Configuration to Platform 2.8/Java 21 (Resolves All Compiler Issues)#104
FLAG-87: Complete Configuration to Platform 2.8/Java 21 (Resolves All Compiler Issues)#104Abhxay wants to merge 13 commits intoopenmrs:masterfrom
Conversation
85863a4 to
2e36195
Compare
|
@Abhxay did you get a chance to take a look at these? https://github.com/openmrs/openmrs-module-htmlformentry/pull/320/files https://openmrs.atlassian.net/jira/polaris/projects/OMRS/ideas/view/3970978?selectedIssue=OMRS-341 |
Action Required: New JIRA Issue I have finalized and pushed the solution for the Configuration Phase (PR #104). The project now compiles successfully against Java 21. The next major task is the Test and Code Refactoring required to achieve full Java 21 compatibility. Please create a new JIRA issue for the following work: Refactor API/FHIR Tests: Migrate PowerMock to Mockito and Resolve Deprecations. |
- Added HibernateFlagDAO to verify SessionFactory interactions. - Configured ByteBuddy and hbm2ddl.auto in test-hibernate.cfg.xml. - Simplified TestingApplicationContext.xml to fix circular bean errors. - Fixed dataset sequencing (Person before Patient) in flagtest-dataset.xml. - Current Blocker: NoSuchTableException for patientflags_flag during FlagTest.
|
PR Status Update: Java 21 & Platform 2.8.0 Migration Completed Fixes: Referential Integrity: Updated the XML dataset sequencing (ensuring Person and Metadata precede Patient and Concepts) to fix previous IntegrityConstraintViolation errors. DAO Layer: Updated HibernateFlagDAO to use DbSessionFactory in alignment with Hibernate 5 requirements for Platform 2.8.0. Current Blocker: Error logs: org.dbunit.dataset.NoSuchTableException: patientflags_flag |
Module now targets OpenMRS Platform 2.8.0 and successfully compiles using Java 21.
Key Configuration Fixes 1. Dependency Management: Added maven-parent-openmrs-module:1.1.0 and explicitly defined required module versions to resolve "version is missing" errors. 2. Java 21 Compliance: Upgraded to 1.18.30 and configured maven-compiler-plugin to target Java 21. 3. Testing Bridge: Added necessary test dependencies (spring-test, junit-vintage-engine) to link JUnit 4 tests to the modern Java 21 runtime.
The build currently fails test execution (even with the vintage engine) due to incompatibility with libraries like PowerMock. This requires a dedicated PR to refactor all static mocks using modern Mockito methods.